/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package bean;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Redação_RádioPérola
 */
@Embeddable
public class ComprasItemPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "COM_COD")
    private int comCod;
    @Basic(optional = false)
    @Column(name = "COM_PRO")
    private int comPro;

    public ComprasItemPK() {
    }

    public ComprasItemPK(int comCod, int comPro) {
        this.comCod = comCod;
        this.comPro = comPro;
    }

    public int getComCod() {
        return comCod;
    }

    public void setComCod(int comCod) {
        this.comCod = comCod;
    }

    public int getComPro() {
        return comPro;
    }

    public void setComPro(int comPro) {
        this.comPro = comPro;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) comCod;
        hash += (int) comPro;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ComprasItemPK)) {
            return false;
        }
        ComprasItemPK other = (ComprasItemPK) object;
        if (this.comCod != other.comCod) {
            return false;
        }
        if (this.comPro != other.comPro) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "bean.ComprasItemPK[ comCod=" + comCod + ", comPro=" + comPro + " ]";
    }
    
}
